<?php

namespace App\Http\Controllers\Api;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Input;
use Validator, Redirect, Session, Captcha;
use App\Http\Model\Article\Section;
use App\Http\Model\Article\Article;
class  TestController extends Controller{
   public  function  index(Request $request){
      return json_success('1','随机guid----'.guid());
   }
   public  function  login(Request $request){
       if ($request->has('username')) {
           $username=$request->get('username');
       }else{
           return json_error('username为必填');
       }
       if ($request->has('password')) {
           $password=$request->get('password');
       }else{
           return json_error('password为必填');
       }
      return json_success('登录成功','随机guid----'.guid());
   }
}